package com.lokiy.kit.ext

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.viewbinding.ViewBinding
import com.lokiy.core.ext.inflateMethod

/**
 *
 * @author Lokiy
 * @date 2023-08-04 15:40
 */

inline fun <reified T : ViewBinding> inflate(parent: ViewGroup): T =
    T::class.java.inflateMethod.invoke(null, LayoutInflater.from(parent.context), parent, false) as T
